package com.booking.controller;

import com.booking.common.dto.ClientResp;
import com.booking.controller.model.req.analyse.AnalyseQueryReq;
import com.booking.controller.model.res.OrderCountRes;
import com.booking.service.AnalyseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 游客控制器
 * @author Qikai.Lin
 * @date 2023/4/23
 */
@Slf4j
@RestController
@RequestMapping("/api/analyse")
public class AnalyseController {

    @Autowired
    private AnalyseService analyseService;
    //订单总数
    @PostMapping("/orderCount")
    public ClientResp<OrderCountRes> orderCount(@RequestBody @Valid AnalyseQueryReq request) {
        return ClientResp.success(analyseService.getOrderCount(request));
    }
    //销售总数

    //房间预定量

    //服务预定量


}
